**************************************************************************************************************************************************************************
*** do-file replication for Vanagt, J. & Russo, L. (2024) Affect, Not Money: A Comparative Study on Economic Hardship and Affective Polarisation. Research & Politics. ***
**************************************************************************************************************************************************************************

****************************************
*** 12-polity dataset (abbrev.: eap) ***
****************************************

* clear
clear all
estimates clear

* working directory
cd "[insert working directory]"

* log file
log using log_eap

* graph style
set scheme s1mono
graph set window fontface "Times New Roman"

* dataset
use eap, clear

******************************
*** descriptive statistics ***
******************************

*** income ***
statsby, by(b_income) : ci means p_wap_parties 
twoway bar mean b_income, barw(0.6) bfcolor(black*0.2) || rcap lb ub b_income, scheme(s1color) legend(off) yla(0 "0" 1 "1" 0.5(0.5)3.5, ang(h)) xla(1 2 3 4 5 6 7 8 9 10) subtitle()
graph export "figures/income-ap.png", replace
clear
use eap

*** income insecurity ***
statsby, by(b_incsec) : ci means p_wap_parties 
twoway bar mean b_incsec, barw(0.6) bfcolor(black*0.2) || rcap lb ub b_incsec, scheme(s1color) legend(off) yla(0 "0" 1 "1" 0.5(0.5)3.5, ang(h)) xla(1 2 3 4 5 6 7) subtitle()
graph export "figures/incsec-ap.png", replace
clear
use eap

*** buffer ***
statsby, by(b_buffer) : ci means p_wap_parties 
twoway bar mean b_buffer, barw(0.6) bfcolor(black*0.2) || rcap lb ub b_buffer, scheme(s1color) legend(off) yla(0 "0" 1 "1" 0.5(0.5)3.5, ang(h)) xla(1 2 3 4 5 6 7) subtitle()
graph export "figures/buffer-ap.png", replace
clear
use eap

*** job loss ***
statsby, by(b_jobloss) : ci means p_wap_parties 
twoway bar mean b_jobloss, barw(0.6) bfcolor(black*0.2) || rcap lb ub b_jobloss, scheme(s1color) legend(off) yla(0 "0" 1 "1" 0.5(0.5)3.5, ang(h)) xla(1 2 3 4 5 6 7) subtitle()
graph export "figures/jobloss-ap.png", replace
clear
use eap

*** job find ***
statsby, by(b_jobfind) : ci means p_wap_parties 
twoway bar mean b_jobfind, barw(0.6) bfcolor(black*0.2) || rcap lb ub b_jobfind, scheme(s1color) legend(off) yla(0 "0" 1 "1" 0.5(0.5)3.5, ang(h)) xla(1 2 3 4 5 6 7) subtitle()
graph export "figures/jobfind-ap.png", replace
clear
use eap

**************************
*** correlation matrix ***
**************************

pwcorr p_wap_parties b_income b_incsec b_buffer b_jobloss b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2, sig
matrix C = r(C)
matrix sig = r(sig)
heatplot C, values(label(sig)) lower nodraw generate
gen str lab = string(_Z, "%9.2f") + cond(_Mlab<.001, "***", cond(_Mlab<.01, "**", cond(_Mlab<.05, "*", "")))
heatplot C, color(hcl diverging, intensity(.5)) lower legend(off) aspectratio(0.6) label xlabel(,labsize(tiny) angle(45)) ylabel(,labsize(tiny)) ///
    addplot(scatter _Y _X, msymbol(i) mlab(lab) mlabpos(0) mlabcolor(black) mlabsize(tiny) plotregion(margin(tiny)))
graph save "figures/correlation_eap.gph", replace
graph export "figures/correlation_eap.png", replace
drop _Z _Zid _Y _Yshape _X _Xshape _Mlab lab


***************************
*** regression analysis ***
***************************

xi: regress p_wap_parties b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_income
xi: regress p_wap_parties b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_incsec
xi: regress p_wap_parties b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_buffer
xi: regress p_wap_parties b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobloss
xi: regress p_wap_parties b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobfind

label variable p_wap_parties "Like-Dislike (Party)"
label variable p_pp2 "Positive partisanship"
label variable p_pp "Positive partisanship"
label variable p_np "Negative partisanship"
label variable p_idextr_abs "Ideological extremism" 
label variable b_income "Household income"
label variable b_incsec "Income insecurity"
label variable b_buffer "Income buffer"
label variable b_jobloss "Worry over losing job"
label variable b_jobfind "Worry over finding no (new) job"
label variable b_age "Age (years)"
label variable p_int "Political interest"
label variable b_gender "Male"
label variable b_education "Tertiary education"

esttab model_income model_incsec model_buffer using "tables/all_eap_1.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income b_incsec b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("like-dislike party" "like-dislike party" "like-dislike party") interaction(" X ") replace title(Regression Results (Large Dataset): Household Income, Income Insecurity \& Income Buffer (in Fig. \ref{fig:likedislike\_large}) \label{tab:likedislike\_large1}) substitute(\_ _)

esttab model_jobloss model_jobfind using "tables/all_eap_2.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_jobloss b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("like-dislike party" "like-dislike party") interaction(" X ") replace title(Regression Results (Large Dataset): Job Loss \& Job Find (in Fig. \ref{fig:likedislike\_large}) \label{tab:likedislike\_large2}) substitute(\_ _)

coefplot (model_income, pstyle(p4)) (model_incsec, pstyle(p6)) (model_buffer, pstyle(p7)) (model_jobloss, pstyle(p8)) (model_jobfind, pstyle(p9)), bylabel(Like-Dislike (Party)) ||, drop(_cons _Icountry_* _Ip_party* b_age b_gender b_education2) xline(0) order(b_income . b_incsec b_buffer . b_jobloss b_jobfind . p_pp2 p_np p_int p_idextr_abs) xtitle(Unstandardised coefficients) legend(off)
graph export "figures/coefplot_eap.png", replace

*** Interaction with positive partisanship: weak vs. strong partisans ***

xi: regress p_wap_parties c.b_income##c.p_pp p_np p_int p_idextr_abs b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_int_pp_income
xi: regress p_wap_parties c.b_incsec##c.p_pp p_np p_int p_idextr_abs b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_int_pp_incsec
xi: regress p_wap_parties c.b_buffer##c.p_pp p_np p_int p_idextr_abs b_age b_gender b_education2 i.country_sample i.p_party 
estimates store model_int_pp_buffer
xi: regress p_wap_parties c.b_jobloss##c.p_pp p_np p_int p_idextr_abs b_age b_gender b_education2 i.country_sample i.p_party 
estimates store model_int_pp_jobloss
xi: regress p_wap_parties c.b_jobfind##c.p_pp p_np p_int p_idextr_abs b_age b_gender b_education2 i.country_sample i.p_party 
estimates store model_int_pp_jobfind

esttab model_int_pp_income using "tables/eap_int_pp_1.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(p_pp b_income p_int p_idextr_abs p_np b_age b_gender b_education2) mtitles("like-dislike party") interaction(" X ") replace title(Regression Results Interaction Partisanship (Large Dataset): Weak Partisans vs. Strong Partisans (1-7) With Household Income \label{tab:interaction_weakstrong1}) substitute(\_ _)

esttab model_int_pp_incsec model_int_pp_buffer using "tables/eap_int_pp_2.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(p_pp b_incsec b_buffer p_int p_idextr_abs p_np b_age b_gender b_education2) mtitles("like-dislike party" "like-dislike party") interaction(" X ") replace title(Regression Results Interaction Partisanship (Large Dataset): Weak Partisans vs. Strong Partisans (1-7) With Income Insecurity \& Income Buffer \label{tab:interaction_weakstrong2}) substitute(\_ _)

esttab model_int_pp_jobloss model_int_pp_jobfind using "tables/eap_int_pp_3.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(p_pp b_jobloss b_jobfind p_int p_idextr_abs p_np b_age b_gender b_education2) mtitles("like-dislike party" "like-dislike party") interaction(" X ") replace title(Regression Results Interaction Partisanship (Large Dataset): Weak Partisans vs. Strong Partisans (1-7) With Job Loss \& Job Find \label{tab:interaction_weakstrong3}) substitute(\_ _)

*** Interaction with positive partisanship: non-partisans vs partisans ***

xi: regress p_wap_parties c.b_income##c.p_pp2 p_np p_int p_idextr_abs b_age b_gender b_education2 i.country_sample i.p_party 
estimates store model_int_pp2_income
xi: regress p_wap_parties c.b_incsec##c.p_pp2 p_np p_int p_idextr_abs b_age b_gender b_education2 i.country_sample i.p_party 
estimates store model_int_pp2_incsec
xi: regress p_wap_parties c.b_buffer##c.p_pp2 p_np p_int p_idextr_abs b_age b_gender b_education2 i.country_sample i.p_party 
estimates store model_int_pp2_buffer
xi: regress p_wap_parties c.b_jobloss##c.p_pp2 p_np p_int p_idextr_abs b_age b_gender b_education2 i.country_sample i.p_party 
estimates store model_int_pp2_jobloss
xi: regress p_wap_parties c.b_jobfind##c.p_pp2 p_np p_int p_idextr_abs b_age b_gender b_education2 i.country_sample i.p_party 
estimates store model_int_pp2_jobfind

esttab model_int_pp2_income using "tables/eap_int_pp2_1.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(p_pp2 b_income p_int p_idextr_abs p_np b_age b_gender b_education2) mtitles("like-dislike party") interaction(" X ") replace title(Regression Results Interaction Partisanship (Large Dataset): Non-Partisans (0) vs. Partisans (1) With Household Income \label{tab:interaction_non1}) substitute(\_ _)

esttab model_int_pp2_incsec model_int_pp2_buffer using "tables/eap_int_pp2_2.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(p_pp2 b_incsec b_buffer p_int p_idextr_abs p_np b_age b_gender b_education2) mtitles("like-dislike party" "like-dislike party") interaction(" X ") replace title(Regression Results Interaction Partisanship (Large Dataset): Non-Partisans (0) vs. Partisans (1) With Income Insecurity \& Income Buffer \label{tab:interaction_non2}) substitute(\_ _)

esttab model_int_pp2_jobloss model_int_pp2_jobfind using "tables/eap_int_pp2_3.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(p_pp2 b_jobloss b_jobfind p_int p_idextr_abs p_np b_age b_gender b_education2) mtitles("like-dislike party" "like-dislike party") interaction(" X ") replace title(Regression Results Interaction Partisanship (Large Dataset): Non-Partisans (0) vs. Partisans (1) With Job Loss \& Job Find \label{tab:interaction_non3}) substitute(\_ _)

*** country-specific models ***

* income
keep if country_sample==1
xi: regress p_wap_parties b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_AT
clear
use eap
keep if country_sample==3
xi: regress p_wap_parties b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_DE
clear
use eap
keep if country_sample==4
xi: regress p_wap_parties b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_DK
clear
use eap
keep if country_sample==5
xi: regress p_wap_parties b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_EL
clear
use eap
keep if country_sample==6
xi: regress p_wap_parties b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_ES
clear
use eap
keep if country_sample==7
xi: regress p_wap_parties b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_FR
clear
use eap
keep if country_sample==8
xi: regress p_wap_parties b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_IT
clear
use eap
keep if country_sample==9
xi: regress p_wap_parties b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_NL
clear
use eap
keep if country_sample==10
xi: regress p_wap_parties b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_PT
clear
use eap
keep if country_sample==11
xi: regress p_wap_parties b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_UK
clear
use eap
keep if country_sample==12
xi: regress p_wap_parties b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_BEFL
clear
use eap
keep if country_sample==13
xi: regress p_wap_parties b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_BEWL
clear
use eap

label variable p_wap_parties "Like-Dislike (Party)"
label variable p_pp2 "Positive partisanship"
label variable p_np "Negative partisanship"
label variable p_idextr_abs "Ideological extremism"
label variable b_age "Age (years)"
label variable p_int "Political interest"
label variable b_gender "Male"
label variable b_education "Tertiary education" 
label variable b_income "Household income"

esttab model1_AT model1_DE model1_DK model1_EL model1_ES model1_FR using "tables/eap_countries_income_1.tex", indicate("party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("Austria" "Germany" "Denmark" "Greece" "Spain" "France") interaction(" X ") replace title(Country-Specific Regression Results (Large Dataset): Household Income 1/2 \label{tab:countries_income1}) substitute(\_ _)

esttab model1_IT model1_NL model1_PT model1_UK model1_BEFL model1_BEWL using "tables/eap_countries_income_2.tex", indicate("party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("Italy" "Netherlands" "Portugal" "United Kingdom" "Flanders" "Wallonia") interaction(" X ") replace title(Country-Specific Regression Results (Large Dataset): Household Income 2/2 \label{tab:countries_income2}) substitute(\_ _)

coefplot (model1_AT, label(AT)  pstyle(p1)) (model1_DE, label(DE)  pstyle(p2)) (model1_DK, label(DK)  pstyle(p3)) (model1_EL, label(EL)  pstyle(p4)) (model1_ES, label(ES)  pstyle(p5)) (model1_FR, label(FR)  pstyle(p6)) (model1_IT, label(IT)  pstyle(p7)) (model1_NL, label(NL)  pstyle(p8)) (model1_PT, label(PT)  pstyle(p9)) (model1_UK, label(UK)  pstyle(p10)) (model1_BEFL, label(BE-FL)  pstyle(p11)) (model1_BEWL, label(BE-WL)  pstyle(p12)), bylabel(Like-Dislike (Party)) ||, keep(b_income) xline(0) byopts(compact cols(3)) xtitle(Unstandardised coefficients) legend(cols(4))
graph export "figures/coefplot_countries_income.png", replace

* income insecurity
keep if country_sample==1
xi: regress p_wap_parties b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_AT
clear
use eap
keep if country_sample==3
xi: regress p_wap_parties b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_DE
clear
use eap
keep if country_sample==4
xi: regress p_wap_parties b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_DK
clear
use eap
keep if country_sample==5
xi: regress p_wap_parties b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_EL
clear
use eap
keep if country_sample==6
xi: regress p_wap_parties b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_ES
clear
use eap
keep if country_sample==7
xi: regress p_wap_parties b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_FR
clear
use eap
keep if country_sample==8
xi: regress p_wap_parties b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_IT
clear
use eap
keep if country_sample==9
xi: regress p_wap_parties b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_NL
clear
use eap
keep if country_sample==10
xi: regress p_wap_parties b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_PT
clear
use eap
keep if country_sample==11
xi: regress p_wap_parties b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_UK
clear
use eap
keep if country_sample==12
xi: regress p_wap_parties b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_BEFL
clear
use eap
keep if country_sample==13
xi: regress p_wap_parties b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_BEWL
clear
use eap

label variable p_wap_parties "Like-Dislike (Party)"
label variable p_pp2 "Positive partisanship"
label variable p_np "Negative partisanship"
label variable p_idextr_abs "Ideological extremism"
label variable b_age "Age (years)"
label variable p_int "Political interest"
label variable b_gender "Male"
label variable b_education "Tertiary education" 
label variable b_incsec "Income insecurity"

esttab model1_AT model1_DE model1_DK model1_EL model1_ES model1_FR using "tables/eap_countries_incsec_1.tex", indicate("party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("Austria" "Germany" "Denmark" "Greece" "Spain" "France") interaction(" X ") replace title(Country-Specific Regression Results (Large Dataset): Income Insecurity 1/2 \label{tab:countries_incsec1}) substitute(\_ _)

esttab model1_IT model1_NL model1_PT model1_UK model1_BEFL model1_BEWL using "tables/eap_countries_incsec_2.tex", indicate("party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("Italy" "Netherlands" "Portugal" "United Kingdom" "Flanders" "Wallonia") interaction(" X ") replace title(Country-Specific Regression Results (Large Dataset): Income Insecurity 2/2 \label{tab:countries_incsec2}) substitute(\_ _)

coefplot (model1_AT, label(AT)  pstyle(p1)) (model1_DE, label(DE)  pstyle(p2)) (model1_DK, label(DK)  pstyle(p3)) (model1_EL, label(EL)  pstyle(p4)) (model1_ES, label(ES)  pstyle(p5)) (model1_FR, label(FR)  pstyle(p6)) (model1_IT, label(IT)  pstyle(p7)) (model1_NL, label(NL)  pstyle(p8)) (model1_PT, label(PT)  pstyle(p9)) (model1_UK, label(UK)  pstyle(p10)) (model1_BEFL, label(BE-FL)  pstyle(p11)) (model1_BEWL, label(BE-WL)  pstyle(p12)), bylabel(Like-Dislike (Party)) ||, keep(b_incsec) xline(0) byopts(compact cols(3)) xtitle(Unstandardised coefficients) legend(cols(4))
graph export "figures/coefplot_countries_incsec.png", replace

* buffer
keep if country_sample==1
xi: regress p_wap_parties b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_AT
clear
use eap
keep if country_sample==3
xi: regress p_wap_parties b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_DE
clear
use eap
keep if country_sample==4
xi: regress p_wap_parties b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_DK
clear
use eap
keep if country_sample==5
xi: regress p_wap_parties b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_EL
clear
use eap
keep if country_sample==6
xi: regress p_wap_parties b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_ES
clear
use eap
keep if country_sample==7
xi: regress p_wap_parties b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_FR
clear
use eap
keep if country_sample==8
xi: regress p_wap_parties b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_IT
clear
use eap
keep if country_sample==9
xi: regress p_wap_parties b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_NL
clear
use eap
keep if country_sample==10
xi: regress p_wap_parties b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_PT
clear
use eap
keep if country_sample==11
xi: regress p_wap_parties b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_UK
clear
use eap
keep if country_sample==12
xi: regress p_wap_parties b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_BEFL
clear
use eap
keep if country_sample==13
xi: regress p_wap_parties b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_BEWL
clear
use eap

label variable p_wap_parties "Like-Dislike (Party)"
label variable p_pp2 "Positive partisanship"
label variable p_np "Negative partisanship"
label variable p_idextr_abs "Ideological extremism"
label variable b_age "Age (years)"
label variable p_int "Political interest"
label variable b_gender "Male"
label variable b_education "Tertiary education" 
label variable b_buffer "Income buffer"

esttab model1_AT model1_DE model1_DK model1_EL model1_ES model1_FR using "tables/eap_countries_buffer_1.tex", indicate("party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("Austria" "Germany" "Denmark" "Greece" "Spain" "France") interaction(" X ") replace title(Country-Specific Regression Results (Large Dataset): Income Buffer 1/2 \label{tab:countries_buffer1}) substitute(\_ _)

esttab model1_IT model1_NL model1_PT model1_UK model1_BEFL model1_BEWL using "tables/eap_countries_buffer_2.tex", indicate("party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("Italy" "Netherlands" "Portugal" "United Kingdom" "Flanders" "Wallonia") interaction(" X ") replace title(Country-Specific Regression Results (Large Dataset): Income Buffer 2/2 \label{tab:countries_buffer2}) substitute(\_ _)

coefplot (model1_AT, label(AT)  pstyle(p1)) (model1_DE, label(DE)  pstyle(p2)) (model1_DK, label(DK)  pstyle(p3)) (model1_EL, label(EL)  pstyle(p4)) (model1_ES, label(ES)  pstyle(p5)) (model1_FR, label(FR)  pstyle(p6)) (model1_IT, label(IT)  pstyle(p7)) (model1_NL, label(NL)  pstyle(p8)) (model1_PT, label(PT)  pstyle(p9)) (model1_UK, label(UK)  pstyle(p10)) (model1_BEFL, label(BE-FL)  pstyle(p11)) (model1_BEWL, label(BE-WL)  pstyle(p12)), bylabel(Like-Dislike (Party)) ||, keep(b_buffer) xline(0) byopts(compact cols(3)) xtitle(Unstandardised coefficients) legend(cols(4))
graph export "figures/coefplot_countries_buffer.png", replace

* job loss
keep if country_sample==1
xi: regress p_wap_parties b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_AT
clear
use eap
keep if country_sample==3
xi: regress p_wap_parties b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_DE
clear
use eap
keep if country_sample==4
xi: regress p_wap_parties b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_DK
clear
use eap
keep if country_sample==5
xi: regress p_wap_parties b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_EL
clear
use eap
keep if country_sample==6
xi: regress p_wap_parties b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_ES
clear
use eap
keep if country_sample==7
xi: regress p_wap_parties b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_FR
clear
use eap
keep if country_sample==8
xi: regress p_wap_parties b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_IT
clear
use eap
keep if country_sample==9
xi: regress p_wap_parties b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_NL
clear
use eap
keep if country_sample==10
xi: regress p_wap_parties b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_PT
clear
use eap
keep if country_sample==11
xi: regress p_wap_parties b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_UK
clear
use eap
keep if country_sample==12
xi: regress p_wap_parties b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_BEFL
clear
use eap
keep if country_sample==13
xi: regress p_wap_parties b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_BEWL
clear
use eap

label variable p_wap_parties "Like-Dislike (Party)"
label variable p_pp2 "Positive partisanship"
label variable p_np "Negative partisanship"
label variable p_idextr_abs "Ideological extremism"
label variable b_age "Age (years)"
label variable p_int "Political interest"
label variable b_gender "Male"
label variable b_education "Tertiary education" 
label variable b_jobloss "Worry over losing job"

esttab model1_AT model1_DE model1_DK model1_EL model1_ES model1_FR using "tables/eap_countries_jobloss_1.tex", indicate("party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("Austria" "Germany" "Denmark" "Greece" "Spain" "France") interaction(" X ") replace title(Country-Specific Regression Results (Large Dataset): Worry Over Losing Job 1/2 \label{tab:countries_jobloss1}) substitute(\_ _)

esttab model1_IT model1_NL model1_PT model1_UK model1_BEFL model1_BEWL using "tables/eap_countries_jobloss_2.tex", indicate("party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("Italy" "Netherlands" "Portugal" "United Kingdom" "Flanders" "Wallonia") interaction(" X ") replace title(Country-Specific Regression Results (Large Dataset): Worry Over Losing Job 2/2 \label{tab:countries_jobloss2}) substitute(\_ _)

coefplot (model1_AT, label(AT)  pstyle(p1)) (model1_DE, label(DE)  pstyle(p2)) (model1_DK, label(DK)  pstyle(p3)) (model1_EL, label(EL)  pstyle(p4)) (model1_ES, label(ES)  pstyle(p5)) (model1_FR, label(FR)  pstyle(p6)) (model1_IT, label(IT)  pstyle(p7)) (model1_NL, label(NL)  pstyle(p8)) (model1_PT, label(PT)  pstyle(p9)) (model1_UK, label(UK)  pstyle(p10)) (model1_BEFL, label(BE-FL)  pstyle(p11)) (model1_BEWL, label(BE-WL)  pstyle(p12)), bylabel(Like-Dislike (Party)) ||, keep(b_jobloss) xline(0) byopts(compact cols(3)) xtitle(Unstandardised coefficients) legend(cols(4))
graph export "figures/coefplot_countries_jobloss.png", replace

* job find
keep if country_sample==1
xi: regress p_wap_parties b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_AT
clear
use eap
keep if country_sample==3
xi: regress p_wap_parties b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_DE
clear
use eap
keep if country_sample==4
xi: regress p_wap_parties b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_DK
clear
use eap
keep if country_sample==5
xi: regress p_wap_parties b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_EL
clear
use eap
keep if country_sample==6
xi: regress p_wap_parties b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_ES
clear
use eap
keep if country_sample==7
xi: regress p_wap_parties b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_FR
clear
use eap
keep if country_sample==8
xi: regress p_wap_parties b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_IT
clear
use eap
keep if country_sample==9
xi: regress p_wap_parties b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_NL
clear
use eap
keep if country_sample==10
xi: regress p_wap_parties b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_PT
clear
use eap
keep if country_sample==11
xi: regress p_wap_parties b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_UK
clear
use eap
keep if country_sample==12
xi: regress p_wap_parties b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_BEFL
clear
use eap
keep if country_sample==13
xi: regress p_wap_parties b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.p_party 
estimates store model1_BEWL
clear
use eap

label variable p_wap_parties "Like-Dislike (Party)"
label variable p_pp2 "Positive partisanship"
label variable p_np "Negative partisanship"
label variable p_idextr_abs "Ideological extremism"
label variable b_age "Age (years)"
label variable p_int "Political interest"
label variable b_gender "Male"
label variable b_education "Tertiary education" 
label variable b_jobfind "Worry over finding no (new) job"

esttab model1_AT model1_DE model1_DK model1_EL model1_ES model1_FR using "tables/eap_countries_jobfind_1.tex", indicate("party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("Austria" "Germany" "Denmark" "Greece" "Spain" "France") interaction(" X ") replace title(Country-Specific Regression Results (Large Dataset): Worry Over Finding No (New) Job 1/2 \label{tab:countries_jobfind1}) substitute(\_ _)

esttab model1_IT model1_NL model1_PT model1_UK model1_BEFL model1_BEWL using "tables/eap_countries_jobfind_2.tex", indicate("party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("Italy" "Netherlands" "Portugal" "United Kingdom" "Flanders" "Wallonia") interaction(" X ") replace title(Country-Specific Regression Results (Large Dataset): Worry Over Finding No (New) Job 2/2 \label{tab:countries_jobfind2}) substitute(\_ _)

coefplot (model1_AT, label(AT)  pstyle(p1)) (model1_DE, label(DE)  pstyle(p2)) (model1_DK, label(DK)  pstyle(p3)) (model1_EL, label(EL)  pstyle(p4)) (model1_ES, label(ES)  pstyle(p5)) (model1_FR, label(FR)  pstyle(p6)) (model1_IT, label(IT)  pstyle(p7)) (model1_NL, label(NL)  pstyle(p8)) (model1_PT, label(PT)  pstyle(p9)) (model1_UK, label(UK)  pstyle(p10)) (model1_BEFL, label(BE-FL)  pstyle(p11)) (model1_BEWL, label(BE-WL)  pstyle(p12)), bylabel(Like-Dislike (Party)) ||, keep(b_jobfind) xline(0) byopts(compact cols(3)) xtitle(Unstandardised coefficients) legend(cols(4))
graph export "figures/coefplot_countries_jobfind.png", replace

***************************************
*** robustness check: less controls ***
***************************************

xi: regress p_wap_parties b_income b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_income
xi: regress p_wap_parties b_incsec b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_incsec
xi: regress p_wap_parties b_buffer b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_buffer
xi: regress p_wap_parties b_jobloss b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobloss
xi: regress p_wap_parties b_jobfind b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobfind

label variable p_wap_parties "Like-Dislike (Party)"
label variable p_pp2 "Positive partisanship"
label variable p_pp "Positive partisanship"
label variable p_np "Negative partisanship"
label variable p_idextr_abs "Ideological extremism" 
label variable b_income "Household income"
label variable b_incsec "Income insecurity"
label variable b_buffer "Income buffer"
label variable b_jobloss "Worry over losing job"
label variable b_jobfind "Worry over finding no (new) job"
label variable b_age "Age (years)"
label variable p_int "Political interest"
label variable b_gender "Male"
label variable b_education "Tertiary education"

esttab model_income model_incsec model_buffer using "tables/all_eap_1_lesscontrols.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income b_incsec b_buffer b_age b_gender b_education2) mtitles("like-dislike party" "like-dislike party" "like-dislike party") interaction(" X ") replace title(Regression Results With Less Controls (Large Dataset): Household Income, Income Insecurity \& Income Buffer) substitute(\_ _)

esttab model_jobloss model_jobfind using "tables/all_eap_2_lesscontrols.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_jobloss b_jobfind b_age b_gender b_education2) mtitles("like-dislike party" "like-dislike party") interaction(" X ") replace title(Regression Results With Less Controls (Large Dataset): Job Loss \& Job Find) substitute(\_ _)

*******************************************
*** robustness check: ideological camps ***
*******************************************

xi: regress p_wap_parties c.b_income##i.p_idcamp p_pp2 p_np p_int p_idextr_abs b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_int_income
xi: regress p_wap_parties c.b_incsec##i.p_idcamp p_pp2 p_np p_int p_idextr_abs b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_int_incsec
xi: regress p_wap_parties c.b_buffer##i.p_idcamp p_pp2 p_np p_int p_idextr_abs b_age b_gender b_education2 i.country_sample i.p_party 
estimates store model_int_buffer
xi: regress p_wap_parties c.b_jobloss##i.p_idcamp p_pp2 p_np p_int p_idextr_abs b_age b_gender b_education2 i.country_sample i.p_party 
estimates store model_int_jobloss
xi: regress p_wap_parties c.b_jobfind##i.p_idcamp p_pp2 p_np p_int p_idextr_abs b_age b_gender b_education2 i.country_sample i.p_party 
estimates store model_int_jobfind

esttab model_int_income using "tables/eap_int_idcamp_1.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(p_pp2 b_income p_int p_idextr_abs p_np b_age b_gender b_education2) mtitles("like-dislike party") interaction(" X ") replace title(Regression Results Interaction Ideological Camp (Large Dataset): With Household Income) substitute(\_ _)

esttab model_int_incsec using "tables/eap_int_idcamp_2.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(p_pp2 b_incsec p_int p_idextr_abs p_np b_age b_gender b_education2) mtitles("like-dislike party" "like-dislike party") interaction(" X ") replace title(Regression Results Interaction Ideological Camp (Large Dataset): With Income Insecurity) substitute(\_ _)

esttab model_int_buffer using "tables/eap_int_idcamp_3.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(p_pp2 b_buffer p_int p_idextr_abs p_np b_age b_gender b_education2) mtitles("like-dislike party" "like-dislike party") interaction(" X ") replace title(Regression Results Interaction Ideological Camp (Large Dataset): With Income Buffer) substitute(\_ _)

esttab model_int_jobloss model_int_jobfind using "tables/eap_int_idcamp_4.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(p_pp2 b_jobloss b_jobfind p_int p_idextr_abs p_np b_age b_gender b_education2) mtitles("like-dislike party" "like-dislike party") interaction(" X ") replace title(Regression Results Interaction Ideological Camp (Large Dataset): With Job Loss \& Job Find) substitute(\_ _)

***************************************
*** robustness check: non-linearity ***
***************************************

recode b_income (1 10 = 4) (2 9 = 3) (3 8 = 2) (4 7 = 1) (5 6 = 0), gen (b_income_rec)
recode b_incsec (1 7 = 3) (2 6 = 2) (3 5 = 1) (4 = 0), gen(b_incsec_rec)
recode b_buffer (1 7 = 3) (2 6 = 2) (3 5 = 1) (4 = 0), gen(b_buffer_rec)
recode b_jobloss (1 7 = 3) (2 6 = 2) (3 5 = 1) (4 = 0), gen(b_jobloss_rec)
recode b_jobfind (1 7 = 3) (2 6 = 2) (3 5 = 1) (4 = 0), gen(b_jobfind_rec)

xi: regress p_wap_parties b_income_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_income
xi: regress p_wap_parties b_incsec_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_incsec
xi: regress p_wap_parties b_buffer_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_buffer
xi: regress p_wap_parties b_jobloss_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobloss
xi: regress p_wap_parties b_jobfind_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobfind

label variable p_wap_parties "Like-Dislike (Party)"
label variable p_pp2 "Positive partisanship"
label variable p_pp "Positive partisanship"
label variable p_np "Negative partisanship"
label variable p_idextr_abs "Ideological extremism" 
label variable b_income_rec "Household income (recoded)"
label variable b_incsec_rec "Income insecurity (recoded)"
label variable b_buffer_rec "Income buffer (recoded)"
label variable b_jobloss_rec "Worry over losing job (recoded)"
label variable b_jobfind_rec "Worry over finding no (new) job (recoded)"
label variable b_age "Age (years)"
label variable p_int "Political interest"
label variable b_gender "Male"
label variable b_education "Tertiary education"

esttab model_income model_incsec model_buffer using "tables/all_eap_1_rec.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income_rec b_incsec_rec b_buffer_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("like-dislike party" "like-dislike party" "like-dislike party") interaction(" X ") replace title(Regression Results With Economic Variables Recoded as Distance From Midpoint (Large Dataset): Household Income, Income Insecurity \& Income Buffer) substitute(\_ _)

esttab model_jobloss model_jobfind using "tables/all_eap_2_rec.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_jobloss_rec b_jobfind_rec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("like-dislike party" "like-dislike party") interaction(" X ") replace title(Regression Results With Economic Variables Recoded as Distance From Midpoint (Large Dataset): Job Loss \& Job Find) substitute(\_ _)

******************************************
*** robustness check: in-group ratings ***
******************************************

xi: regress p_ingrouprating b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_income
xi: regress p_ingrouprating b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_incsec
xi: regress p_ingrouprating b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_buffer
xi: regress p_ingrouprating b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobloss
xi: regress p_ingrouprating b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobfind

label variable p_pp2 "Positive partisanship"
label variable p_pp "Positive partisanship"
label variable p_np "Negative partisanship"
label variable p_idextr_abs "Ideological extremism" 
label variable b_income "Household income"
label variable b_incsec "Income insecurity"
label variable b_buffer "Income buffer"
label variable b_jobloss "Worry over losing job"
label variable b_jobfind "Worry over finding no (new) job"
label variable b_age "Age (years)"
label variable p_int "Political interest"
label variable b_gender "Male"
label variable b_education "Tertiary education"

esttab model_income model_incsec model_buffer using "tables/all_eap_1_in.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income b_incsec b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("in-group like party" "in-group like party" "in-group like party") interaction(" X ") replace title(Regression Results In-Group Like (Large Dataset): Household Income, Income Insecurity \& Income Buffer) substitute(\_ _)

esttab model_jobloss model_jobfind using "tables/all_eap_2_in.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_jobloss b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("in-group like party" "in-group like party") interaction(" X ") replace title(Regression Results In-Group Like (Large Dataset): Job Loss \& Job Find) substitute(\_ _)

*******************************************
*** robustness check: out-group ratings ***
*******************************************

xi: regress p_outgrouprating b_income p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_income
xi: regress p_outgrouprating b_incsec p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_incsec
xi: regress p_outgrouprating b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_buffer
xi: regress p_outgrouprating b_jobloss p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobloss
xi: regress p_outgrouprating b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2 i.country_sample i.p_party
estimates store model_jobfind

label variable p_pp2 "Positive partisanship"
label variable p_pp "Positive partisanship"
label variable p_np "Negative partisanship"
label variable p_idextr_abs "Ideological extremism" 
label variable b_income "Household income"
label variable b_incsec "Income insecurity"
label variable b_buffer "Income buffer"
label variable b_jobloss "Worry over losing job"
label variable b_jobfind "Worry over finding no (new) job"
label variable b_age "Age (years)"
label variable p_int "Political interest"
label variable b_gender "Male"
label variable b_education "Tertiary education"

esttab model_income model_incsec model_buffer using "tables/all_eap_1_out.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_income b_incsec b_buffer p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("out-group dislike party" "out-group dislike party" "out-group dislike party") interaction(" X ") replace title(Regression Results Out-Group Dislike (Large Dataset): Household Income, Income Insecurity \& Income Buffer) substitute(\_ _)

esttab model_jobloss model_jobfind using "tables/all_eap_2_out.tex", indicate("country FE = _Icountry_*" "party FE = _Ip_party*") label se r2 ar2 varlabels(_cons Intercept) star(* .05 ** .01 *** .001) legend cells(b(star fmt(3)) se(par(`"("' `")"') fmt(3))) order(b_jobloss b_jobfind p_int p_idextr_abs p_pp2 p_np b_age b_gender b_education2) mtitles("out-group dislike party" "out-group dislike party") interaction(" X ") replace title(Regression Results Out-Group Dislike (Large Dataset): Job Loss \& Job Find) substitute(\_ _)


* close and safe log file
log close
translate log_eap.smcl log_eap.log

******************
*** END SCRIPT ***
******************
